public class demoRTTI_2{
  public static void main(String args[]){
     superGen <Integer> oa = new superGen<Integer>(100);
     derivedGen<Integer,String> ob = new derivedGen<Integer, String>(200,"Good");
     if (oa instanceof derivedGen)
       System.out.println("superGen object is instance of derivedGen");
     if (ob instanceof superGen)
       System.out.println("derivedGen object is instance of superGen");
     if(oa.getClass() == ob.getClass())  
       System.out.println("superGen class equals derivedGen class");
  }
}